package com.example.glgk.controller.indicatorAnalysis;


import com.example.glgk.VO.IndicatorDataEntityVO;
import com.example.glgk.dto.indicatorAnalysisDto.IndicatorDataEntityDto;
import com.example.glgk.service.IndicatorAnalysisService.IndicatorAnalysisService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@Api(tags = "指标分析接口")
@Slf4j
@RestController
@RequestMapping("/IndicatorAnalysisController")
@CrossOrigin(origins = "*")
public class IndicatorAnalysisController {

    @Autowired
    IndicatorAnalysisService indicatorAnalysisService;

    /**
     * 指标分析-获取56个国考指标
     * @return
     */
    @PostMapping("/queryIndicatorList")
    public List<IndicatorDataEntityVO> queryIndicatorList(){
        List<IndicatorDataEntityVO> list=indicatorAnalysisService.queryIndicatorList();
        return list;
    }


    /**
     * 指标分析-查询指标下的各类数据
     * @return
     */
    @PostMapping("/queryIndicatorDataInfo")
    public IndicatorDataEntityVO queryIndicatorDataInfo(@RequestBody IndicatorDataEntityDto indicatorDataEntityDto){
        IndicatorDataEntityVO result=indicatorAnalysisService.queryIndicatorDataInfo(indicatorDataEntityDto);
        return result;
    }




}
